home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Trouble Reading Binary Data from MicroVAX III
- Date: 15 Apr 1996 07:41:13 -0700
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4ktn69INNohu@keats.ugrad.cs.ubc.ca>
- References: <4kh8d8$kjc@newshound.csrv.uidaho.edu>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4kh8d8$kjc@newshound.csrv.uidaho.edu>,
- Ron Patterson <patt9451@uidaho.edu> wrote:
- >Hello all,
- >
- >I am having trouble reading binary data that was created with a MicroVAX III
- >workstation. I am able to read int's, and char's o.k. but the majority of
- >the data is a large number of floating point values. fread() returns the
- >correct number of floating point numbers read but the data is a mess of zeros
- >and extremely large or small numbers. Is this a big endian/little endian
- >problem (my program is being compiled and run on a PC with a 32 bit C compiler)
- >or bit ordering problem? I know the size of a float on both systems is the
- >same (4 bytes). Any help would be great!
-
- The Vax doesn't use IEEE floating point representation, as far as I remember. I
- don't have references off-hand that would tell me what that representation is,
- but all I can say is: be prepared to do some bit twiddling to recover the
- values.
-
- One of the textbooks by William Stallings, or just about any general text on
- computer architectures, should have a description.
- --
- I'm not really a jerk, but I play one on Usenet.
-